package com.ant.backstage.utils.jxls;


import java.util.List;

public class JxlsExcelFile {


    public static boolean excelFile(String outPath, String templatePath, List<Object> data) throws Exception {
        JxlsBuilder jxlsBuilder = JxlsBuilder
                .getBuilder(templatePath)
                .out(outPath)
                .ignoreImageMiss(true)
                .putVar("list", data)
                .build();
        System.out.println("导出成功");
        System.out.println(jxlsBuilder.getOutFile().getAbsolutePath());
        return true;

    }
}
